﻿using System;
using System.Collections.Generic;

using RexToy.UI.WinForm;
using RexToy.UI.WinForm.Pmlx;
using RexToy.UI.WinForm.ViewModel;

namespace Studio.ViewModel
{
    public class FrmAboutVM : ViewModelBase
    {
        private IUICommand _okCmd;
        public IUICommand OKCommand
        {
            get
            {
                if (_okCmd == null)
                {
                    _okCmd = new ActionCommand(() => this.OnClose());
                }
                return _okCmd;
            }
        }

        private IUICommand _sysCmd;
        public IUICommand SysCommand
        {
            get
            {
                if (_sysCmd == null)
                {
                    _sysCmd = new ActionCommand(() => System.Diagnostics.Process.Start("MSInfo32.exe"));
                }
                return _sysCmd;
            }
        }

        public string Info
        {
            get
            {
                Version v = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
                return string.Format("ToolBox. version {0}", v);
            }
        }
    }
}
